package student.design_pattern.observer_pattern;

import cn.hutool.core.lang.Console;


public class ConcreteSubject extends Subject {

    private String state;

    public String getState() {
        return state;
    }

    public void change(String newState) {
        state = newState;
        Console.log("SZH", " concreteSubject state:" + newState);

        //状态发生改变，通知观察者
        notifyEveryOne(newState);
    }
}